#!/bin/sh

. libtest.sh
. libgit.sh

steps '
	:save-display initial-diff.screen
	:20 # Move to a deleted line.
	:view-blame
	:scroll-right
	:save-display blame-deleted-line.screen
'

in_work_dir create_repo_from_tgz "$base_dir/files/scala-js-benchmarks.tgz"

test_tig show a1dcf1a

sed -i.old -n /asInstanceOf/p *.screen

assert_equals 'initial-diff.screen' <<EOF
-  val global = js.Dynamic.global.asInstanceOf[js.Dictionary]
+  val global = js.Dynamic.global.asInstanceOf[js.Dictionary[js.Any]]
EOF

# Make sure that we find the commit that introduce the deleted line.
assert_equals 'blame-deleted-line.screen' <<EOF
0500  17x  val global = js.Dynamic.global.asInstanceOf[js.Dictionary]
EOF
